/* ======== 全局样式 ======== */
:root {
  --primary-color: #ff6d3f;
  --secondary-color: #4a90e2;
  --accent-color: #7c4dff;
  --dark-color: #333333;
  --light-color: #f8f9fa;
  --gray-color: #e0e0e0;
  --success-color: #66bb6a;
  --warning-color: #ffa726;
  --danger-color: #ef5350;
  --text-color: #212121;
  --text-light: #757575;
  --border-radius: 8px;
  --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
  color: var(--text-color);
  line-height: 1.6;
  background-color: #f5f5f5;
}

a {
  text-decoration: none;
  color: var(--primary-color);
  transition: var(--transition);
}

a:hover {
  color: #ff5722;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* ======== 头部样式 ======== */
.header {
  background-color: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
}

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  height: 40px;
  margin-right: 10px;
}

.logo-text {
  font-size: 22px;
  font-weight: bold;
  color: var(--primary-color);
}

.nav-menu {
  display: flex;
  gap: 20px;
}

.nav-link {
  font-size: 16px;
  color: var(--dark-color);
  padding: 8px 12px;
  border-radius: 20px;
  transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
  background-color: var(--primary-color);
  color: white;
}

.user-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

.search-bar {
  position: relative;
}

.search-input {
  width: 180px;
  padding: 8px 12px 8px 35px;
  border: 1px solid var(--gray-color);
  border-radius: 20px;
  font-size: 14px;
  transition: var(--transition);
}

.search-input:focus {
  width: 220px;
  outline: none;
  border-color: var(--primary-color);
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--dark-color);
}

/* ======== Hero区域 ======== */
.hero {
  background: linear-gradient(135deg, #ff9a8b 0%, #ff6a88 100%);
  color: white;
  padding: 60px 0;
  margin-bottom: 40px;
}

.hero-content {
  max-width: 600px;
}

.hero-title {
  font-size: 2.5rem;
  margin-bottom: 15px;
}

.hero-subtitle {
  font-size: 1.2rem;
  margin-bottom: 30px;
  opacity: 0.9;
}

.hero-btn {
  display: inline-block;
  background-color: white;
  color: var(--primary-color);
  padding: 12px 30px;
  border-radius: 30px;
  font-weight: bold;
  font-size: 16px;
  transition: var(--transition);
}

.hero-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* ======== 游戏卡片 ======== */
.section-title {
  font-size: 1.8rem;
  margin-bottom: 25px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primary-color);
  display: inline-block;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 25px;
  margin-bottom: 40px;
}

.game-card {
  background-color: white;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
}

.game-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.game-thumbnail {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.game-info {
  padding: 15px;
}

.game-title {
  font-size: 18px;
  margin-bottom: 8px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.game-category {
  display: inline-block;
  background-color: var(--light-color);
  padding: 3px 10px;
  border-radius: 15px;
  font-size: 12px;
  margin-bottom: 10px;
}

.game-stats {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--text-light);
}

.game-rating {
  display: flex;
  align-items: center;
}

.star-icon {
  color: #ffc107;
  margin-right: 4px;
}

/* ======== 按钮样式 ======== */
.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 25px;
  font-size: 16px;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background-color: #ff5722;
  color: white;
}

.btn-secondary {
  background-color: var(--secondary-color);
  color: white;
}

.btn-secondary:hover {
  background-color: #3a7bc8;
  color: white;
}

.btn-outline {
  background-color: transparent;
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
}

.btn-outline:hover {
  background-color: var(--primary-color);
  color: white;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 14px;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 18px;
}

/* ======== 分类导航 ======== */
.category-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 30px;
}

.category-item {
  padding: 8px 20px;
  background-color: white;
  border-radius: 20px;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid var(--gray-color);
}

.category-item:hover,
.category-item.active {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

/* ======== 页脚样式 ======== */
.footer {
  background-color: var(--dark-color);
  color: white;
  padding: 50px 0 20px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  margin-bottom: 30px;
}

.footer-title {
  font-size: 18px;
  margin-bottom: 15px;
  font-weight: 600;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
}

.footer-links a:hover {
  color: var(--primary-color);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  text-align: center;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
}

/* ======== 表单样式 ======== */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
}

.form-control {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--gray-color);
  border-radius: var(--border-radius);
  font-size: 16px;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(255, 109, 63, 0.2);
}

.form-text {
  font-size: 14px;
  color: var(--text-light);
  margin-top: 5px;
}

/* ======== 响应式设计 ======== */
@media (max-width: 992px) {
  .hero-title {
    font-size: 2rem;
  }
  
  .search-input {
    width: 150px;
  }
  
  .search-input:focus {
    width: 180px;
  }
}

@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 80%;
    height: calc(100vh - 70px);
    background-color: white;
    flex-direction: column;
    padding: 20px;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    gap: 10px;
  }
  
  .nav-menu.active {
    left: 0;
  }
  
  .mobile-menu-btn {
    display: block;
  }
  
  .header-inner {
    padding: 10px 0;
  }
  
  .search-bar {
    display: none;
  }
  
  .game-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
  
  .footer-content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 576px) {
  .hero {
    padding: 40px 0;
  }
  
  .hero-title {
    font-size: 1.8rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  .section-title {
    font-size: 1.5rem;
  }
  
  .game-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .game-thumbnail {
    height: 200px;
  }
}

/* ======== 实用工具类 ======== */
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.d-flex { display: flex; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
.flex-wrap { flex-wrap: wrap; }
.gap-10 { gap: 10px; }
.gap-20 { gap: 20px; }
.w-100 { width: 100%; }

/* ======== 通知样式 ======== */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 15px 20px;
  border-radius: var(--border-radius);
  background-color: white;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  display: flex;
  align-items: center;
  transform: translateX(120%);
  transition: transform 0.3s ease;
}

.notification.show {
  transform: translateX(0);
}

.notification-icon {
  margin-right: 10px;
  font-size: 20px;
}

.notification-success .notification-icon {
  color: var(--success-color);
}

.notification-info .notification-icon {
  color: var(--secondary-color);
}

.notification-warning .notification-icon {
  color: var(--warning-color);
}

.notification-error .notification-icon {
  color: var(--danger-color);
}

.notification-message {
  flex-grow: 1;
}

.notification-close {
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  font-size: 18px;
  margin-left: 10px;
}

/* ======== 上传表单样式 ======== */
.upload-area {
  background-color: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 30px;
  margin-bottom: 40px;
}

.file-upload {
  border: 2px dashed var(--gray-color);
  border-radius: var(--border-radius);
  padding: 30px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 20px;
}

.file-upload:hover,
.file-upload.dragover {
  border-color: var(--primary-color);
  background-color: rgba(255, 109, 63, 0.05);
}

.file-upload-icon {
  font-size: 48px;
  color: var(--text-light);
  margin-bottom: 10px;
}

.file-upload-text {
  margin-bottom: 10px;
}

.file-upload-info {
  font-size: 14px;
  color: var(--text-light);
}

.progress-container {
  height: 10px;
  background-color: var(--gray-color);
  border-radius: 5px;
  margin-bottom: 10px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background-color: var(--primary-color);
  width: 0;
  transition: width 0.3s ease;
}

/* ======== 游戏详情页样式 ======== */
.game-details {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 30px;
  margin-bottom: 40px;
}

.game-preview {
  background-color: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  overflow: hidden;
}

.game-frame {
  width: 100%;
  height: 500px;
  border: none;
}

.game-details-info {
  background-color: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 20px;
}

.game-details-title {
  font-size: 24px;
  margin-bottom: 15px;
}

.game-details-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 20px;
  color: var(--text-light);
  font-size: 14px;
}

.game-description {
  margin-bottom: 20px;
  line-height: 1.7;
}

.game-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

@media (max-width: 992px) {
  .game-details {
    grid-template-columns: 1fr;
  }
  
  .game-frame {
    height: 400px;
  }
}

@media (max-width: 576px) {
  .game-frame {
    height: 300px;
  }
}

/* ======== 加载动画 ======== */
.loading {
  width: 50px;
  height: 50px;
  border: 5px solid var(--gray-color);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 20px auto;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

/* ======== 用户资料页样式 ======== */
.profile-header {
  background-color: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  margin-bottom: 30px;
  align-items: center;
}

.profile-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
}

.profile-info {
  flex-grow: 1;
}

.profile-name {
  font-size: 24px;
  margin-bottom: 10px;
}

.profile-stats {
  display: flex;
  gap: 20px;
  margin-top: 15px;
}

.profile-stat {
  text-align: center;
}

.profile-stat-value {
  font-size: 20px;
  font-weight: bold;
  color: var(--primary-color);
}

.profile-stat-label {
  font-size: 14px;
  color: var(--text-light);
}

.profile-tabs {
  display: flex;
  border-bottom: 1px solid var(--gray-color);
  margin-bottom: 30px;
}

.profile-tab {
  padding: 10px 20px;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: var(--transition);
}

.profile-tab:hover {
  color: var(--primary-color);
}

.profile-tab.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}

/* ======== 评分星星 ======== */
.rating-stars {
  display: flex;
  gap: 5px;
}

.rating-star {
  font-size: 18px;
  cursor: pointer;
  color: var(--gray-color);
}

.rating-star.filled {
  color: #ffc107;
}

/* My Games Section Styles */
.my-games-section {
    margin-bottom: 30px;
    background-color: #ffffff;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.my-games-section h2 {
    font-size: 24px;
    color: #333;
    margin-bottom: 20px;
    position: relative;
}

.my-games-section h2:after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 3px;
    background-color: #00b0ff;
    border-radius: 3px;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.game-card {
    background-color: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #f0f0f0;
    position: relative;
    cursor: pointer;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.game-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.game-card-content {
    padding: 15px;
}

.game-card h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
    color: #333;
}

.game-card p {
    margin: 0 0 10px 0;
    color: #666;
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.game-card-status {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #ff9800;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
}

.game-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.game-card-category {
    background-color: #e0f2f1;
    color: #00796b;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.game-card-date {
    color: #888;
    font-size: 12px;
}

/* Make sure the "My Games" section is responsive */
@media (max-width: 768px) {
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
    
    .my-games-section {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .games-grid {
        grid-template-columns: 1fr 1fr;
    }
} 